package pack1;

import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class CreateCust {
	public static WebDriver driver=null;
	public static void main(String[] args) 
	{
		
driver= new FirefoxDriver();

driver.get("http://anand-pc");

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

ProjectSpecific.login("admin", "manager");
			
	String xlp="./exfiles/At_CustomerCreate_Valid.xlsx",sht="Sheet1";
	    int l= Generic.getXLRowCount(xlp,sht);
	    String un,pwd;
	   // String eSuccessMsg=null;
	    
	 /*ijg
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 
	  * 	   System.out.println("hhhh"); 
	  */
	    
	    
	    
	    
	cmn();	
		for(int i=1;i<l;i++)
		{  un =Generic.getXLCellValue(xlp, sht, i,0);
		System.out.println(un);
	    // 	pwd=Generic.getXLCellValue(xlp, sht, i, 1);
		
		ProjectSpecific.createCustomer(un);
		System.out.println("loop"); 
		
		//eSuccessMsg="Customer \"CustomerA\" has been successfully created.";
		cmn();
		}
	//	ProjectSpecific.verifySuccessMsg(eSuccessMsg);
		
		ProjectSpecific.logOut();
	}

	static void cmn()
	{	ProjectSpecific.gotoTasks();
	ProjectSpecific.gotoProjectsAndCustomers();
  ProjectSpecific.gotoNewCustomerPage();
  
	}
}